package com.cskaoyan.controller;

import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author stone
 * @date 2022/12/26 10:08
 */
@RestController
public class HelloController {

    @RequestMapping("hello/{username}")
    public String hello(@PathVariable("username") String name) {
        String result = "hello " + name;
        System.out.println(result);
        return result;
    }

    public HelloController() {
        System.out.println("Controller init");
    }
}
